<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">添加让利类别</h4>
    <button onClick="javascript: history.go(-1);" class="btn-back btn btn-dark btn-sm btn-rounded">
        返回
    </button>
</div>

<div class="wrapper" ng-controller="benefitAddCtrl">
    <div class="panel panel-body padder-md">
        <!--让利类型-->
        <div>
            <div class="padder-md padder-v bg-light m-b-sm">
                <span class="font-bold">让利类别信息</span>
            </div>
            <div>
                <form name="benefitForm">
                    <div class="form-horizontal form-validation">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">商家让利区间</label>
                            <div class="col-sm-1">
                                <input type="number" name="startBenefit" ng-model="benefit.startBenefit" min="{{benefit.startBenefit}}" max="100" class="form-control m-b-xs" placeholder="开始值" required readonly>
                                <div ng-if="benefitForm.startBenefit.$touched">
                                    <p ng-if="benefitForm.startBenefit.$error.required" class="text-danger h6">开始值是必需的</p>
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <input type="number" name="endBenefit" ng-model="benefit.endBenefit" min="{{benefit.startBenefit+1}}" max="100" class="form-control m-b-xs" placeholder="结束值" required>
                                <div ng-if="benefitForm.endBenefit.$touched">
                                    <p ng-if="benefitForm.endBenefit.$error.required" class="text-danger h6">结束值是必需的</p>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">分润占比</label>
                            <div class="col-sm-3">
                                <input type="text" name="value" ng-model="benefit.value" class="form-control m-b-xs" placeholder="请输入分润占比" required>
                                <div ng-if="benefitForm.value.$touched">
                                    <p ng-if="benefitForm.value.$error.required" class="text-danger h6">分润占比是必需的</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="line line-dashed b-b line-lg pull-in"></div>
                    <div>
                        <div class="col-sm-3 padder-v col-sm-offset-2">
                            <button type="submit" class="btn btn-success"  ng-disabled="benefitForm.$invalid" ng-click="add()">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>